package com.zx.map.dao;

import com.zx.map.dao.model.AgentInfo;
import com.zx.map.dao.model.ShareProfitLog;
import com.zx.map.dao.model.ShareProfitLogExample;
import org.springframework.dao.DataAccessException;

import java.util.List;

public interface ShareProfitLogDao {

	/**
	 * 新增
	 *
	 * @param shareProfitLog
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public String add(ShareProfitLog shareProfitLog) throws DataAccessException;

	/**
	 * 更新
	 *
	 * @param shareProfitLog
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public String update(ShareProfitLog shareProfitLog) throws DataAccessException;

	/**
	 * 删除
	 *
	 * @param shareProfitLog
	 * @throws org.springframework.dao.DataAccessException
	 */
	public void delete(ShareProfitLog shareProfitLog) throws DataAccessException;

	/**
	 * 根据Model查找List
	 * @param example
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public List<ShareProfitLog> getListByExample(ShareProfitLogExample example) throws DataAccessException;

     /**
     *  根据筛选的记录 更新某个字段
     */
    public void updateByExample(ShareProfitLog encashLog, ShareProfitLogExample example);
    
    public int countListByExample(ShareProfitLogExample example);
    
    /**
     * 分页查找
     */
	public List<ShareProfitLog> getPageByExample(int pageSize, int pageBegin,
			ShareProfitLogExample example) throws DataAccessException ;

	List<ShareProfitLog> queryShareProfitLog(AgentInfo currentLoginAgentInfo, ShareProfitLog shareProfitLogModel, int beginIndex);

	int queryCountShareProfitLog(AgentInfo agentInfo, ShareProfitLog shareProfitLogModel);
	/**
	 *代理商收益 分享收益汇总
	 */
	double countSprofitBal(ShareProfitLogExample example);

	/**
	 * 代理商收益 可用余额汇总
	 */
	double countSprofitAvlAmt(ShareProfitLogExample example);
}
